package org.redmagic.service.domain;

import java.util.List;

import com.google.common.base.Preconditions;

public class Property {

	private final String base;
	private final List<String> tags;
	private final String value;
	
	public Property(String base, List<String> tags, String value) {
		validate(base, tags, value);
		
		this.base = base;
		this.tags = tags;
		this.value = value;
	}

	private void validate(String base, List<String> tags, String value) {
		Preconditions.checkNotNull(base, "base");
		Preconditions.checkArgument(!base.trim().isEmpty(), "base cannot be empty.");
		Preconditions.checkNotNull(tags, "tags");
		Preconditions.checkNotNull(value, "value");
	}

	public String getBase() {
		return base;
	}

	public List<String> getTags() {
		return tags;
	}

	public String getValue() {
		return value;
	}
}